package com.cn.parks.dao;

import com.cn.parks.entity.User;
import java.util.List;

public interface UserDao {
    // 添加用户
    int insert(User user) throws Exception;
    
    // 删除用户
    int deleteById(String userId) throws Exception;
    
    // 更新用户信息
    int update(User user) throws Exception;
    
    // 根据ID查询用户
    User getById(Integer userId) throws Exception;
    
    // 查询所有用户
    List<User> getAll() throws Exception;

    //统计用户数量
    Integer getUserCount() throws Exception;
    
    // 用户登录验证
    User login(String userName, String password) throws Exception;
    
    // 根据角色查询用户
    List<User> getByRoleId(String roleId) throws Exception;
} 